<template>
  <div class="container">
    <div class="roster-detail">
        <h4>基本信息</h4>
        <i-cell-group class="panel-box">
            <i-cell title="姓名" v-model="currentInfo.F_EmpName"></i-cell>
            <i-cell title="性别" v-model="currentInfo.F_Sex"></i-cell>
            <i-cell title="出生年月" v-model="currentInfo.F_Birthday" is-link></i-cell>
            <i-cell title="证件号码" v-model="currentInfo.F_IDNum"></i-cell>
            <i-cell title="手机号码" v-model="currentInfo.F_Telphone"></i-cell>
            <i-cell title="入职公司" v-model="currentInfo.F_EntryOrg" is-link></i-cell>
            <i-cell title="社保缴纳城市" v-model="currentInfo.F_Securitycity" is-link></i-cell>
            <i-cell title="工作地点" v-model="currentInfo.F_Workcity" is-link></i-cell>
        </i-cell-group>
        <h4>商保方案</h4>
        <i-cell-group class="panel-box group" v-for="(item, index) in currentInfo.planSetList" :key="index">
            <i-cell title="方案" v-model="item.planName" is-link></i-cell>
            <i-cell title="保费标准" v-model="item.F_Insfee"></i-cell>
            <i-cell title="产生保费" v-model="item.insamount" ></i-cell>
            <view class="p10"></view>
        </i-cell-group>

        <!-- <h4>附件</h4>
        <i-cell-group class="panel-box">
            <i-cell title="身份证正面" v-model="currentInfo.name" is-link></i-cell>
            <i-cell title="身份证反面" v-model="currentInfo.sex" is-link></i-cell>
            <i-cell title="其他材料" v-model="currentInfo.birthday" is-link></i-cell>
        </i-cell-group> -->
        <!-- <buttomBtn title="编辑" @handleClick = 'handleClick'></buttomBtn> -->
    </div>
  </div>
</template>

<script>
import buttomBtn from '@/components/Bbutton'
export default {
    data () {
        return {
            currentInfo: {
                'F_EmpName': '',
                'F_Sex': '',
                'F_Telphone': null,
                'F_Birthday': '',
                'F_Age': null,
                'F_IDType': '',
                'F_IDNum': '',
                'F_Securitycity': '',
                'F_EntryOrg': '',
                'F_OrgInfo': '',
                'F_Header': '',
                'F_Workcity': '',
                'F_BankCard': null,
                'F_BankCity': null,
                'F_BankName': null,
                'F_CreatorTime': '',
                'F_CreatorUserId': ''
            },
            required: true
        }
    },

    components: {
        buttomBtn
    },

    methods: {
        handleClick () {
            console.log('11111')
        }
    },

    mounted () {
        console.log(this.$root.$mp)
        this.currentInfo = JSON.parse(this.$root.$mp.query.userInfo)
        this.currentInfo.F_Birthday = this.currentInfo.F_Birthday.replace('T00:00:00', '')
        this.currentInfo.planSetList.forEach(item => {
            item.F_Insfee = item.F_Insfee + item.F_InsfeeType
            item.insamount = item.insamount + '元'
        })
    }
}
</script>

<style lang='stylus' scoped>
.roster-detail
    width 750rpx
    h4
        height 80rpx
        line-height 80rpx
        margin-left 50rpx
    .panel-box
        box-sizing border-box
    .group
        .p10
            padding-bottom 10rpx
</style>
